package java67_8;

import java.util.Scanner;

public class CalcAvg {
//####
//####	
	public static void main(String[] args) {
		// 计算三个班4名同学的平均成绩
		Scanner in = new Scanner(System.in);
		int sum = 0;
		int count = 0;
		for (int i = 1; i <= 3; i++) {
			sum = 0;// 重新赋值
			for (int j = 1; j <= 4; j++) {
				System.out.print("请输入" + i + "班第" + j + "名同学成绩:");
				int s = in.nextInt();
				sum = sum + s;
				if (s < 85)
					continue;

				count++;
			}
			double avg = sum * 1.0 / 4;
			System.out.println(i + "班 平均分是:" + avg);
		}
		System.out.println("超过85分的人数是:" + count + "人");
	}

}
